﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Xiaov.SmartWeb.Application.PluginSrc.StatisticalSystem.ReportDesign
{
    public partial class Admin_ReportDesign : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindXmlList();
            }
        }

        private void BindXmlList()
        {
            string[] strlist1 = Directory.GetFiles(System.Web.HttpContext.Current.Server.MapPath("~/PluginSrc/StatisticalSystem/Xml/"));
            List<ListItem> list = new List<ListItem>();
            foreach (var q in strlist1)
            {
                ListItem li = new ListItem();
                li.Text = q.Substring(q.LastIndexOf('\\') + 1);
                li.Value = q;
                list.Add(li);
            }
            ddl_xml.DataSource = list;
            ddl_xml.DataBind();
        }
    }
}